<html>
<head><meta charset="utf-8"><title>Trying out the tool · t-compiler/cargo-bisect-rustc · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/index.html">t-compiler/cargo-bisect-rustc</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying.20out.20the.20tool.html">Trying out the tool</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="225850626"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying%20out%20the%20tool/near/225850626" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> apiraino <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying.20out.20the.20tool.html#225850626">(Feb 10 2021 at 15:16)</a>:</h4>
<p>After some time I decided to give cargo -bisect another try. I'm trying to bisect issue <a href="https://github.com/rust-lang/rust/issues/81844">#81844</a> to provide a better bisection, but I'm a bit confused.<br>
I followed the <a href="https://github.com/rust-lang/cargo-bisect-rustc/blob/master/TUTORIAL.md">tutorial</a> and tried to run a  "grandma test" on it:</p>
<ul>
<li>Created a small repo for the mcve: <a href="https://github.com/apiraino/test-81844">https://github.com/apiraino/test-81844</a></li>
<li>cloned the mega rustlang repo somewhere else</li>
<li>thanks to <a href="https://github.com/rust-lang/rust/issues/81844#issuecomment-774811596">this comment</a> I have a hint on where to start looking</li>
</ul>



<a name="225850655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying%20out%20the%20tool/near/225850655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> apiraino <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying.20out.20the.20tool.html#225850655">(Feb 10 2021 at 15:16)</a>:</h4>
<p>So I run <code>cargo bisect-rustc --preserve --start=2020-04-01 --end=2020-04-30</code> and I get</p>
<div class="codehilite"><pre><span></span><code>$ cargo bisect-rustc --preserve --start=2020-04-01 --end=2020-04-30
installing nightly-2020-04-01
testing...
RESULT: nightly-2020-04-01, ===&gt; Yes
ERROR: the start of the range (nightly-2020-04-01) must not reproduce the regression
</code></pre></div>
<p>is this a "success" or a "failure"?</p>



<a name="225850685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying%20out%20the%20tool/near/225850685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> apiraino <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying.20out.20the.20tool.html#225850685">(Feb 10 2021 at 15:16)</a>:</h4>
<p>I read <code>RESULT... YES</code> so I feel encouraged and ignore the error. I then get the commits of the rustlang repository  in that date range:<br>
<code>git log --since "APR 15 2020" --until "APR 30 2020" --author=bors --pretty=format:"%H %an %ad"</code></p>
<p>which corresponds to range <code>eece58a8e35c444afba6fa34873bc0244e32cd29</code> -&gt; <code>835428c35d785733e72bfbf32fc2f8fff3e50e63</code></p>
<p>(by the way adding <code>--reverse</code> to the git command suggested gives me a list oldest  -&gt; newest which I find more "natural")</p>



<a name="225850745"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying%20out%20the%20tool/near/225850745" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> apiraino <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying.20out.20the.20tool.html#225850745">(Feb 10 2021 at 15:17)</a>:</h4>
<p>so, let's bisect this range:<br>
<code>cargo bisect-rustc --preserve --start=835428c35d785733e72bfbf32fc2f8fff3e50e63 --end=eece58a8e35c444afba6fa34873bc0244e32cd29</code></p>



<a name="225850770"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying%20out%20the%20tool/near/225850770" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> apiraino <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying.20out.20the.20tool.html#225850770">(Feb 10 2021 at 15:17)</a>:</h4>
<p>result:</p>
<div class="codehilite"><pre><span></span><code>$ cargo bisect-rustc --preserve --start=835428c35d785733e72bfbf32fc2f8fff3e50e63 --end=eece58a8e35c444afba6fa34873bc0244e32cd29
bisecting ci builds
starting at 835428c35d785733e72bfbf32fc2f8fff3e50e63, ending at eece58a8e35c444afba6fa34873bc0244e32cd29
...
fetching (via local git) commits from 835428c35d785733e72bfbf32fc2f8fff3e50e63 to eece58a8e35c444afba6fa34873bc0244e32cd29
...
found 84 bors merge commits in the specified range
  commit[0] 2020-04-15UTC: Auto merge of #71172 - pietroalbini:update-tool-maintainers, r=pietroalbini
 ....
  commit[83] 2020-04-30UTC: Auto merge of #71707 - Dylan-DPC:rollup-hk8itvo, r=Dylan-DPC
ERROR: no commits between 835428c35d785733e72bfbf32fc2f8fff3e50e63 and eece58a8e35c444afba6fa34873bc0244e32cd29 within last 167 days
</code></pre></div>



<a name="225850812"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying%20out%20the%20tool/near/225850812" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> apiraino <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying.20out.20the.20tool.html#225850812">(Feb 10 2021 at 15:17)</a>:</h4>
<p>I don't understand the error message, maybe it has to something to do with <a href="#narrow/stream/217417-t-compiler.2Fcargo-bisect-rustc/topic/Error.20running.20cargo.20bisect-rustc/near/213916438">this comment</a> (i.e. only pick commit on the master branch)?</p>
<p>From here I don't know how to continue <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span></p>



<a name="225852076"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying%20out%20the%20tool/near/225852076" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying.20out.20the.20tool.html#225852076">(Feb 10 2021 at 15:25)</a>:</h4>
<p><code>ERROR: the start of the range (nightly-2020-04-01) must not reproduce the regression</code></p>
<p>This means that either the reproduction doesn't actually reproduce correctly (that is, it generates an unrelated error), or the date needs to be moved back further.  When bisecting, it can be confusing what success/failure yes/no means.  Here, "yes" means the "regression" was found.  The start range should <em>not</em> reproduce the regression, so that's why it reports it as an error.</p>
<p>I'll try to take a look at your repro.</p>



<a name="225853540"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying%20out%20the%20tool/near/225853540" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying.20out.20the.20tool.html#225853540">(Feb 10 2021 at 15:34)</a>:</h4>
<p>I'm a bit confused by the comment on the issue.  I'm able to reproduce the overflow all the way back to 1.31 (which is roughly 2018-10-25).  The example won't build on older versions.  I suspect this isn't something new.</p>



<a name="225853797"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying%20out%20the%20tool/near/225853797" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying.20out.20the.20tool.html#225853797">(Feb 10 2021 at 15:36)</a>:</h4>
<p>BTW, you can pass <code>-vv</code> to <code>cargo-bisect-rustc</code> to have it print the output.  I think it should do that by default when the starting range fails.</p>



<a name="225856729"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying%20out%20the%20tool/near/225856729" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> apiraino <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying.20out.20the.20tool.html#225856729">(Feb 10 2021 at 15:55)</a>:</h4>
<p>thank you <span class="user-mention" data-user-id="120518">@Eric Huss</span> for clarifying some of my questions! I'll start the bisection again and see if I get better results</p>



<a name="226714272"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying%20out%20the%20tool/near/226714272" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hameer Abbasi <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying.20out.20the.20tool.html#226714272">(Feb 17 2021 at 19:44)</a>:</h4>
<p>Is the program supposed to compile? If it’s an Error code to ICE or similar you’ll need to add <code>—regress=ice</code>.</p>



<a name="226714417"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying%20out%20the%20tool/near/226714417" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hameer Abbasi <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying.20out.20the.20tool.html#226714417">(Feb 17 2021 at 19:45)</a>:</h4>
<p>By default I believe it checks for a nonzero error code. You can pass it a script which exits with 0 on no bug and 1 on bug and pass it that too.</p>



<a name="226717010"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying%20out%20the%20tool/near/226717010" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying.20out.20the.20tool.html#226717010">(Feb 17 2021 at 20:03)</a>:</h4>
<p>Just to be clear, it's <code>--regress=ice</code> (not <code>-regress=ice</code>).</p>



<a name="226955826"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying%20out%20the%20tool/near/226955826" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hameer Abbasi <a href="https://rust-lang.github.io/zulip_archive/stream/217417-t-compiler/cargo-bisect-rustc/topic/Trying.20out.20the.20tool.html#226955826">(Feb 19 2021 at 12:22)</a>:</h4>
<p>Yes, autocorrect, replacing a double dash by a long one. :) Sorry about that.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>